<template>
	<view>
		<button @click="chooseImg()">上传图片</button>
		<image v-for="item in imgArr" :src="item" @click="previewImg(item)"></image>
	</view>
	
</template>

<script>
	export default{
		data(){
			return{
				imgArr: []
			}
		},
		methods:{
			chooseImg(){
				uni.chooseImage({
					count:5,
					success:res=>{
						this.imgArr=res.tempFilePaths
					}
				})
			},
			previewImg(current)
			{
				uni.previewImage({
					current,
					urls: this.imgArr,
					loop:true
				})
			}
		}
	}
</script>
<style>
</style>